import { Injectable } from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
import { User } from '../entities/user.entity';
import { Repository } from 'typeorm';

@Injectable()
export class UserService {
  constructor(@InjectRepository(User) protected repository: Repository<User>) {}
  async findAll(): Promise<User[]> {
    return this.repository.find();
  }
}
